//
//  WPDiagnosisModel.m
//  wobingwoyi
//
//  Created by WGP on 2016/11/30.
//  Copyright © 2016年 WGP. All rights reserved.
//

#import "WPDiagnosisModel.h"
#import "WPContentModel.h"

@implementation WPDiagnosisModel

+(instancetype)initWithTime:(NSString *)time arr:(NSArray *)textAndPicArr
{
    WPDiagnosisModel *model = [self new];
    model.time = time;
    
    model.textAndPicArr = [NSMutableArray array];
    for (NSString *content in textAndPicArr)
    {
        CGFloat itemWidth = (SCREEN_WIDTH - 4*10)/3.0;
        CGFloat itemHeight = itemWidth*90/112.5;
        
        WPContentModel *contentModel = [WPContentModel new];
        contentModel.content = content;
        contentModel.width = itemWidth;
        contentModel.height = itemHeight + 10;
        [model.textAndPicArr addObject:contentModel];
    }
    
    return model;
}


@end
